package com.leyou.auth.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 服务端签名返回给服务端的信息
 *
 {
 "accessId":"6MKO******4AUk44",
 "host":"http://post-test.oss-cn-hangzhou.aliyuncs.com",
 "policy":"eyJleHBpcmF0aW9uIjoiMjAxNS0xMS0wNVQyMDo1Mjoy******Jjdb25kaXRpb25zIjpbWyJjdb250ZW50LWxlbmd0aC1yYW5nZSIsMCwxMDQ4NTc2MDAwXSxbInN0YXJ0cy13aXRoIiwiJGtleSIsInVzZXItZGlyXC8iXV19",
 "signature":"VsxOcOudx******z93CLaXPz+4s=",
 "expire":1446727949,
 "dir":"user-dirs/"
 }


 - accessId：用户的AccessKeyId
 - host：申请的阿里OSS的bucket访问地址
 - policy：文件上传的策略，主要包含对上传文件的要求，利用Base64加密后返回，说明文档
 - signature：生成的签名
 - expire：本次签名的过期时间，客户端可以换成签名，在有效期内无需再次签名
 - dir：要上传到bucket中的哪个目录

 */


@Data
@AllArgsConstructor(staticName = "of")
@NoArgsConstructor
public class AliOssSignatureDTO {
    private String accessId;
    private String host;
    private String policy;
    private String signature;
    private long expire;
    private String dir;
}